export default {
    beforeMount(el:HTMLElement,binding:any){
        let throttleTime = binding.value;
        if(!throttleTime){
            throttleTime = 2000;
        }
        
        let cbFun:any;
        el.addEventListener("click",(event)=>{
            console.log(cbFun);
            if(!cbFun){
                cbFun = setTimeout(()=>{
                    cbFun = null;
                },throttleTime)
            }else{
                event && event.stopImmediatePropagation();
            }
        },true);
    }
}